IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tsAutoStatusPlusData]') AND type in (N'U'))
DROP TABLE [dbo].[tsAutoStatusPlusData]

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tsAutoStatusPlusAddTimesheet]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[tsAutoStatusPlusAddTimesheet]

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tsAutoStatusPlusGetUnprocessedTimesheets]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[tsAutoStatusPlusGetUnprocessedTimesheets]

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tsAutoStatusPlusSetTimesheetProcessed]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[tsAutoStatusPlusSetTimesheetProcessed]

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tsAutoStatusPlusSetTimesheetFailed]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[tsAutoStatusPlusSetTimesheetFailed]